package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(60)" json:"username"`
	Password string `gorm:"type:varchar(60)" json:"password"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int" json:"uid"`
	Rid int `gorm:"type:int" json:"rid"`
}

type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}

type RolePerm struct {
	gorm.Model
	Rid int `gorm:"type:int" json:"rid"`
	Pid int `gorm:"type:int" json:"pid"`
}

type Perm struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}
